New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
issue: sendAccessLink On NULL #4828
issue: sendAccessLink On NULL #4828
Conversation
include/class.ticket.php
Outdated
@@ -1079,7 +1079,7 @@ function sendAccessLink($user) { | |||
'body' => $content->getLocalBody($lang), | |||
), $vars); | |||
|
|||
$email->send($user, Format::striptags($msg['subj']), | |||
$email->send($user->getEmail(), Format::striptags($msg['subj']), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any explanation for the change here? The type of user is important when creating message-id in class.mailer.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$user
is always an object and send()
needs the email address instead otherwise you run into the error substr() expects parameter 1 to be string, object given
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe that's correct statement - see send function in class.mailer.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I see what you mean. send()
is supposed to return the email address. I will have to look deeper into why that error occurs.
This addresses an issue where entering a collaborator's email to send ticket email access link throws a fatal error. This is due to the method that checks for tickets with the User's email equal to the email provided. This only checks for User's emails not Collaborator emails. This adds a check for Collaborator emails as well so this will not crash out.
b67a7e0
to
6f9f2e1
Compare
osTicket v1.10.6 Maintenance release for osTicket 1.10 === Enhancements * issue: Upgrader Wrong Guide Link (osTicket#4739) * iframe: Allow Multiple iFrame Domains (osTicket#4781) * issue: Strip Emoticons (osTicket#4523) === Improvements * issue: Maxfilesize Comma Crash (osTicket#4340) * issue: No Save Button On Quicknotes (osTicket#4706) * issue: PHP 7.2 Ticket Status (osTicket#4758) * issue: Canned Response Variables (osTicket#4759) * issue: FAQ Search Results (osTicket#4771) * issue: FAQ Return Errors (osTicket#4772) * issue: Duplicate Form Titles (osTicket#4788) * issue: Organizations Users Sort (osTicket#4806) * oops: Emojis Strip Korean (osTicket#4823) * issue: iFrame On Install (osTicket#4824) * issue: sendAccessLink On NULL (osTicket#4828) * Update README.md (eccc57a, e5f4180) * issue: iFrame Single Quotes (osTicket#4844) * issue: .eml/.msg Attachments (osTicket#4857) === Performance and Security * xss: XSS To LFI Vulnerability (osTicket#4869) * jquery: Update Again (osTicket#4858)
…-null issue: sendAccessLink On NULL
This addresses an issue where entering a collaborator's email to send ticket email access link throws a fatal error. This is due to the method that checks for tickets with the User's email equal to the email provided. This only checks for User's emails not Collaborator emails. This adds a check for Collaborator emails as well so this will not crash out.